js get custom attribute

65

javascript get element by custom attribute -

document.querySelector("div[data-automation='something']")

Select element by custom attribute

Comments

Submit
0 Comments